package com.administrator.scoreManageSys.entity;

import com.administrator.scoreManageSys.service.RoleService;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 项目启动执行类
 *
 * @author lufan
 * @version 1.0.0
 * @date 2018/6/26
 */
@Component
public class MyApplicationRunner implements ApplicationRunner {

    @Resource
    private RoleService roleService;

    @Override
    public void run(ApplicationArguments args) {
        //格式化角色权限及菜单到redis
        roleService.formatRolePermissionAndMenu();
    }
}

